package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.BaseObjectBean;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.ShopCarListBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface ShopCarListContract {
    interface Model {
        Flowable<ShopCarListBeen> initData(String index_status );//0零售 1批发
        Flowable<BaseObjectBean> updateCarNum(String id,String number);
        Flowable<BaseObjectBean> removeGood(String  ids);
        Flowable<ConfirmGoodBeen> confirm(String  cartId,String  user_curent_lng,String  user_curent_lat);


    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onInitSuccess(ShopCarListBeen bean);
        void onUpdateCarNumSuccess(BaseObjectBean bean,int number,int one_position,int position);
        void onRemoveGoodSuccess(BaseObjectBean bean, int one_position,int position,boolean isAll);
        void onConfirmSuccess(ConfirmGoodBeen bean );
        void dialog_num(int one_position, int two_position);

    }

    interface Presenter {
        /**

         */
        void initData(String type);
        void updateCarNum(String id,int number,int one_position,int position);
        void removeGood(String  ids,int one_position,int position,boolean isAll);
        void confirm(String  cartId,String  user_curent_lng,String  user_curent_lat);

        void setNum(int one_position, int two_position);

    }
}
